<?php
class lib_htmlmaker
{
    static function help_html_select($name , $array , $value = null , $include_none = false)
    {
        $str = '<select name="'.$name.'">';
        if($include_none)
            $str .= '<option value=0>全部</option>';
        foreach ((array)$array as $k => $row)
        {
            $str .= '<option value="'.$k.'"'
                 .($value == $k ? ' selected' : '')
                 .'>'.$row.'</option>';
        }
        $str .= "</select>";
        
        return $str;
    }
}
?>